@import './variables.scss';

body[data-theme='theme-dark'] {
	// table
	.el-table {
		--el-table-border: none;
		--el-table-row-hover-bg-color: #56698d; //表格行hover背景色

		.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
			background: none;
		}
		tr {
			background-color: #30557c; //表格的背景色
			.el-table-fixed-column--left,
			.el-table-fixed-column--right {
				background-color: inherit;
			}
		}

		.el-table--striped .el-table__cell.el-table-fixed-column--left,
		.el-table-fixed-column--right {
			background: var(--el-fill-color-lighter);
		}
		thead {
			--el-table-header-text-color: var(--el-color-primary); //表头颜色用主色的hover色
			font-size: 14px;
			font-weight: 600;
			box-sizing: border-box;

			th.el-table__cell {
				background-color: #30557c;
				border-bottom: 1px solid #323c73 !important;
			}
			height: 56px;
		}
		tbody {
			.cell {
				line-height: 33px;
			}
		}
	}

	.el-select-dropdown__item.hover,
	.el-select-dropdown__item:hover {
		background-color: var(--yd-primary-bg-color); //下拉列表hover背景色
	}

	.el-date-table td.disabled .el-date-table-cell {
		background-color: rgba(150, 150, 150, 0.1); //时间选择器disabled选项的背景色
	}
	// 按钮
	.el-button {
		// --el-button-hover-text-color: var(--el-text-color-primary); //按钮hover时的文字颜色
		--el-button-disabled-bg-color: var(--yd-disable-bg-color);
		--el-button-disabled-border-color: var(--yd-disable-bg-color);
		--el-button-disabled-text-color: var(--yd-disable-text-color);
	}

	.el-button--primary {
		--el-button-bg-color: var(--el-color-primary-darker);
		--el-button-border-color: var(--el-color-primary-darker);

		--el-button-active-bg-color: var(--el-color-primary);
		--el-button-active-border-color: var(--el-color-primary);

		--el-button-hover-bg-color: var(--el-color-primary);
		--el-button-hover-border-color: var(--el-color-primary);
		// --el-button-disabled-bg-color: rgba(0, 151, 167, 0.1);
	}
	// input
	.el-input-group__append,
	.el-input-group__prepend {
		background-color: var(--el-color-primary-darker);
		color: var(--el-text-color-primary);
	}
	// dialog
	.el-dialog {
		background-image: url('@/assets/images/init-dialog.png');
		background-repeat: no-repeat;
		background-position: center;
		background-size: 100% 100%;
		background-color: transparent;
	}
	.el-message-box {
		--el-messagebox-title-color: var(--el-text-color-black-light);
		--el-messagebox-content-color: var(--el-text-color-black-light);
		.el-message-box__btns {
			.el-button:not(.el-button--primary) {
				color: var(--el-text-color-black-light);
				&:hover {
					background-color: var(--yd-primary-bg-color-light);
					border-color: var(--yd-primary-bg-color-light);
				}
			}
		}
	}
	// 侧边栏的tooltip
	.el-popper.is-dark {
		background-color: var(--el-text-color-black);
		border: 1px solid var(--el-text-color-black);
		.el-popper__arrow::before {
			background-color: var(--el-text-color-black);
			border: 1px solid var(--el-text-color-black);
		}
	}
	//
	.el-time-spinner__item:hover:not(.is-disabled):not(.is-active) {
		background: none;
	}
	.el-tree {
		// background-color: none;
		.el-tree-node__content {
			// background-color: none;
		}
		.el-tree-node > .el-tree-node__children {
			// background: rgba(0, 0, 0, 0);
		}
		.el-tree-node__content:hover {
			background-color: var(--el-fill-color-blank);
		}
		.el-tree-node__content:hover,
		.el-tree-node__content:active,
		.el-tree-node__content:focus {
			// background-color: var(--yd-primary-bg-color);
		}
	}
	.el-input-number__decrease,
	.el-input-number__increase {
		background-color: var(--el-color-primary);
		border-color: var(--el-color-primary);
		box-sizing: content-box;
		// height: 17px;
		// display: inline-block;
	}
	.el-input-number__increase {
		// border-top: 2px solid var(--el-color-primary);
	}
	.el-form-item__content {
		.el-input {
			width: 100%;
		}
	}
	.el-cascader-panel {
		--el-cascader-node-background-hover: var(--yd-primary-bg-color);
	}
}
